package Enrollment;

class Enrollment {
    private String studentName;
    private String courseName;
    private int score;
    private boolean passed;

    // 构造方法、getter 和 setter 略

    public Enrollment(String studentName, String courseName, int score, boolean passed) {
        this.studentName = studentName;
        this.courseName = courseName;
        this.score = score;
        this.passed = passed;
    }

    public String getStudentName() { return studentName; }
    public String getCourseName() { return courseName; }
    public int getScore() { return score; }
    public boolean isPassed() { return passed; }

    @Override
    public String toString() {
        return studentName + "(" + score + (passed ? ", 通过" : ", 未通过") + ")";
    }
}